import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import config from '@/utils/config'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import '@/assets/css/alex.scss';
import '@/assets/css/iconfont.css';

import TIM from 'tim-js-sdk';
import TIMUploadPlugin from 'tim-upload-plugin';

let options = {
  SDKAppID: config.im.appid
};
let tim = TIM.create(options);
tim.registerPlugin({ 'tim-upload-plugin': TIMUploadPlugin });
Vue.prototype.$TIM = TIM;
Vue.prototype.$tim = tim;

Vue.use(ElementUI);


//验证器
import * as filters from '@/utils/filters.js'
Object.keys(filters).forEach((key) => {
  Vue.filter(key, filters[key])
})
import request from '@/utils/request'
Vue.prototype.$request = request
Vue.config.productionTip = false

import waterfall from 'vue-waterfall2'
Vue.use(waterfall)

new Vue({
  router,
  store,
  render: h => h(App),
  errorCaptured (e) {  //加上这个则vue中不会再报错 
    return false;
  }
}).$mount('#app')
